package at.jaki.ubb.crawling.demo.db;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import at.jaki.ubb.crawling.model.CEEntity;

/**
 * database implementation of news miner
 * 
 * @author Attila Jakabfi
 * 
 */
public final class MockDataBase {

	private static final Logger LOG = Logger.getLogger(MockDataBase.class);

	private static MockDataBase instance;

	public static synchronized MockDataBase getInstance() {
		if (instance == null) {
			instance = new MockDataBase();
		}
		return instance;
	}

	private MockDataBase() {

	}

	private List<CEEntity> list = new ArrayList<CEEntity>();

	public void add(CEEntity entity) {
		LOG.debug("added " + entity);
		list.add(entity);
	}

	public List<CEEntity> getElements() {
		return list;
	}

}
